package com.zxy;

public class Student {
    //成员变量
    private String name;//姓名
    private int age;//年龄
    private String gender;//性别
    private double height;//身高


    //构造方法

    //一旦写了有参构造，就不再默认提供无参构造了，就必须自己补上
    public Student(){

    }
    //有参构造
    public Student(int age, double height, String name, String gender) {
        this.age = age;
        this.name = name;
        this.height = height;
        this.gender = gender;
    }

    //成员方法
    public double getHeight() {
        return height;
    }

    public void setHeight(double height) {
        this.height = height;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
